<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";

const onGetTopIconDistance = () => {
	const storeSystem = useStoreSystem();

	uni.getSystemInfo({
		success: result => {
			const statusBarHeight = result.statusBarHeight || 0;

			const navBarHeight = storeSystem.bounding.height + (storeSystem.bounding.top - statusBarHeight) * 2;

			storeSystem.updateNavBarHeight(navBarHeight);
			storeSystem.updateStatusBarHeight(statusBarHeight);
		}
	});
};

onLaunch(() => {
	onGetTopIconDistance();
});

onShow(() => {
	console.log("onShow");
});

onHide(() => {
	console.log("App Hide");
});
</script>

<style lang="scss" src="./static/style/index.scss"></style>
